home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 35 / Amiga Format AFCD35 (Issue 119, Jan 1999).iso / -in_the_mag- / reader_requests / fredobbutils / bbsrc / profi_intro.s < prev    next >
Text File  |  1998-11-06  |  7KB  |  312 lines

  1. * a little bootintro by PROFI (comments in German)
  2.  
  3. InitBitMap=-390
  4. InitRastPort=-198
  5. ClearScreen=-48
  6. RectFill=-306
  7. FindResident=-96
  8. ScrollRaster=-396
  9. Text=-60
  10.  
  11. OffsetBase=$dff000
  12. VPOSR=$6
  13. DMACON=$96
  14. BPL1MOD=$108
  15. BPL2MOD=$10a
  16. DIWSTRT=$8E
  17. DIWSTOP=$90
  18.  
  19. SETCLR=$8000
  20. DMAEN=$100
  21. DIWSTRTV=44
  22. DIWSTRTH=129
  23. DIWSTOPV=244
  24. DIWSTOPH=193
  25.  
  26. LeftMouseButton=$bfe001
  27.  
  28. RastPort=$70000
  29. BitMap=$70200
  30. Copperlist=$7a000
  31.  
  32.  
  33.     dc.b    'DOS',0
  34.     dc.l    0,880
  35. Start:
  36. ;    move.l    4.w,a6
  37.     movem.l    d0-d7/a0-a6,-(sp)    ; Alle Register auf Stack retten
  38.     Lea    Gfx.name(PC),A1
  39.     Jsr    -408(A6)        ;Graphics Library oeffnen
  40.     Move.l  D0,A6            ;Gfxbase nach A6
  41.  
  42. ; Bildschirm Variable initialisieren
  43.     Lea     OffsetBase,A0
  44.     Move    #SETCLR+DMAEN,DMACON(A0)
  45.     moveq    #6,d0
  46.     Move    d0,BPL1MOD(A0)
  47.     Move    d0,BPL2MOD(A0)
  48.     Move    #DIWSTRTV*$100+DIWSTRTH,DIWSTRT(A0)
  49.     Move    #DIWSTOPV*$100+DIWSTOPH,DIWSTOP(A0)
  50.  
  51. ; Init Copperlist
  52.     Lea    Copperlist,A0
  53.     Move.l    #$00e00005,(A0)+    ; MOVE $5 -> BPL1PTH
  54.     Move.l    #$00e29000,(A0)+    ; MOVE $9000 -> BPL1PTL
  55.     Move.l    #$01001200,(A0)+    ; MOVE 1 -> BPU0 & 1 -> COLOR
  56.     Move.l    #$01800000,(A0)+    ; MOVE 0 -> COLOR0
  57.     Move.l    #$01820000,(A0)+    ; MOVE 0 -> COLOR1
  58.     Lea    Copperlist,A0
  59.     Move.l  A0,50(A6)           ; GfxBase+50
  60.  
  61. ; BitMap initialisieren
  62.     Lea    BitMap,A0           ; BitMap
  63.     Moveq    #1,D0           ; depth
  64.     Move    #368,D1         ; width
  65.     Move    #220,D2         ; height
  66.     Jsr    InitBitMap(A6)
  67.     Move.l    #$58e62,BitMap+8    ; erstes BitPlane
  68.  
  69. ; RastPort initialisieren
  70.     Lea    RastPort,A1         ; rastport
  71.     move.l    a1,a3
  72.     Jsr    InitRastPort(A6)
  73.     move.l    a3,a1
  74.     Move.l  #BitMap,RastPort+4      ; BitMap Addresse -> RastPort
  75.     Jsr    ClearScreen(A6)     ; Bildschirm loeschen
  76.  
  77. ; Kaestchen in die Copperliste schreiben
  78.     Lea    Copperlist+20,A0    ; Ende der Copperliste -> A0
  79.     Move    #175,D7
  80.     Move.l    #$2c09fffe,D5       ; WAIT 8, 44
  81. EinsVertikal:
  82.     Move.l    D5,D0
  83.     Moveq    #15,D6
  84. Horizontalline:
  85.     Move.l    D0,(A0)+
  86.     Move.l    #$1800000,(A0)+     ; MOVE $000 -> COLOR0
  87.     Add.l    #$e0000,D0          ; WAIT Oldx+15, Oldy
  88.     Dbf    D6,Horizontalline
  89.     Add.l    #$1000000,D5        ; WAIT 8, Oldy+1
  90.     Dbf    D7,EinsVertikal
  91.     Moveq    #28,D7          ; Kaestchenhoehe = 10
  92.     Lea    TextScrollFeld(PC),A4
  93. AppendCopList:
  94.     Move.l    (A4)+,(A0)+         ; Scrollfeld malen anhaengen
  95.     Dbf    D7,AppendCopList
  96.  
  97. ; The P.R.O.F.I. auf BitMap malen
  98.     Lea    BobTab(PC),A5
  99.     Moveq    #30,D7          ; The PROFI = 31 Vierecke
  100. InitBob:
  101.     Lea    RastPort,A1         ; RastPort
  102.     moveq    #0,D0              ; xl
  103.     moveq    #0,D1              ; yl
  104.     moveq    #0,D2              ; xu
  105.     moveq    #0,d3              ; yu
  106.     Move.b    (A5)+,D0            ; xl
  107.     Add    #25,D0          ; xl+25
  108.     Move.b    (A5)+,D1            ; yl
  109.     Move.b    (A5)+,D2            ; xu
  110.     Add    #25,D2          ; xu+25
  111.     Move.b    (A5)+,D3            ; yu
  112.     Jsr    RectFill(A6)
  113.     Dbf    D7,InitBob
  114.  
  115. ; Farbtabelle spiegeln auf 44 Farben
  116.     Lea    Farbtabelle(PC),A0
  117.     Lea    Farbtabelle+80(PC),A1
  118.     Moveq    #20,D7
  119. SpiegelFarbtabelleLoop3:
  120.     Move    (A0)+,-(A1)
  121.     Dbf    D7,SpiegelFarbtabelleLoop3
  122.  
  123.     Lea    Dummy(PC),A0
  124.     Move.l    $6c.w,2(A0)    ; -> jmp ($6c)
  125.     Lea    TextScrollen(PC),A0
  126.     Move.l  A0,$6c.w    ; -> jmp Textscrollen
  127.  
  128. MainLoop:
  129.  
  130. ; Farben in die Copperliste eintragen
  131.     Moveq    #21,D7
  132.     Lea    Copperlist+26,A0
  133.     Lea    Farbtabelle(PC),A5
  134.     Move    (A5),-8(A0)
  135. FCLop0: Moveq    #7,D4
  136. FCLop1: Move.l    A5,A1
  137.     Moveq    #15,D6
  138. FCLop2: Move    (A1)+,(A0)
  139.     Addq.l    #8,A0
  140.     Dbf    D6,FCLop2
  141.     Dbf    D4,FCLop1
  142.     Addq.l    #2,A5
  143.     Dbf    D7,FCLop0
  144.  
  145. ; Farbtabelle rotieren
  146.     Lea    Farbtabelle(PC),A0
  147.     Lea    Farbtabelle+2(PC),A1
  148.     Moveq    #38,D0
  149.     Move    (A0),D1         ; farbe0 -> dummy
  150. RotateFarbtabelle:
  151.     Move    (A1)+,(A0)+
  152.     Dbf    D0,RotateFarbtabelle
  153.     Move    D1,-(A1)            ; dummy -> farbe44
  154.  
  155. ; Warten bis Elektronenstrahl in Zeile 64 ist (WaitTOF)
  156. WaitTOF:
  157. ;    Cmpi.b    #64,OffsetBase+VPOSR
  158. ;    Bls.s    WaitTOF
  159.     jsr    -270(a6)
  160.  
  161.     Btst    #6,LeftMouseButton      ; Mousebutton gedrueckt
  162.     Bne.s    MainLoop            ; falls nein -> Mainloop
  163.  
  164. ; Programm beenden
  165.     Lea    Dummy+2(PC),A0
  166.     Move.l    (A0),$6c.w
  167.     Lea    Dummy+10(PC),A1
  168.     Move.l    #$20646f73,(A1)     ; " dos"
  169.  
  170.     Movem.l    (sp)+,d0-d7/a0-a6
  171.     Lea    Dummy+11(PC),A1     ; Name = dos.library
  172.     Jsr    FindResident(A6)
  173.     Move.l    D0,A0
  174.     Move.l    22(A0),A0
  175.     moveq    #0,D0
  176.     Rts
  177.  
  178. TextScrollen:
  179.     Movem.l    d0-d7/a0-a6,-(sp)
  180.     Lea    RastPort,A1         ; RastPort
  181.     Moveq    #1,D0           ; dx
  182.     moveq    #0,d1              ; dy
  183.     moveq    #0,d2              ; minx
  184.     Move    #198,D3         ; miny
  185.     Move    #351,D4         ; maxx
  186.     Move    #206,D5         ; maxy
  187.     Jsr    ScrollRaster(A6)
  188.     Lea    ScrollText-2(PC),A0
  189.     Subq.b    #1,(A0)
  190.     Bne.s    Bra2
  191.     Move.b    #9,(A0)
  192.     Lea    ScrollText-1(PC),A0
  193.     Eori.b    #1,(A0)
  194.     Lea    RastPort,A1
  195.     Move    #320,36(A1)         ; Current Pen Position x
  196.     Move    #205,38(A1)         ; Current Pen Position y
  197.     Lea    AktBuchstabe(PC),A2
  198.     Addq.b    #1,(A2)
  199.     Cmp.b    #TextEnde-ScrollText,(A2)       ;Anzahl der Buchstaben
  200.     Bne.s    PrintBuchstabe
  201.     Clr.b    (A2)
  202. PrintBuchstabe:
  203.     Lea    ScrollText(PC),A0
  204.     Add    -1(A2),A0           ; string
  205.     Moveq    #1,D0           ; count
  206.     Jsr    Text(A6)            ; A1=RastPort
  207.  
  208. Bra2:   Lea    Copperlist+6,A1
  209.     Lea    ScrollText-1(PC),A0
  210.  
  211. ; Scrollen des grossen Schriftzueges
  212. ; er wird durch veraendern der HintergrundBitmap Startaddresse
  213. ; gescrollt.
  214.     Tst.b    (A0)
  215.     Beq.s    Scrollrunter
  216.     Add    #46,(A1)            ; Scrollwert * 46
  217.     Bra.s    Hochgescrollt
  218. Scrollrunter:
  219.     Sub    #46,(A1)            ; Scrollwert * 46
  220. Hochgescrollt:
  221.     Movem.l    (sp)+,d0-d7/a0-a6
  222. Dummy:  Jmp    $ffffffff
  223.  
  224. Gfx.name:dc.b "graphics.library",0
  225. AktBuchstabe:dc.b $ff
  226.  
  227. Farbtabelle:
  228.     dc.w    $005,$006,$007,$008,$009,$00a,$00b,$00c,$00d,$00e,$00f
  229.     dc.w    $50f,$60f,$70f,$80f,$90f,$a0f,$b0f,$c0f,$d0f,$e0f,$f0f
  230.  
  231. TextScrollFeld:
  232.     dc.l    $dc09fffe    ; WAIT 8, 220
  233.     dc.l    $00e2b058    ; MOVE $b058 -> BPL1PTL
  234.     dc.l    $01800aaf    ; MOVE $aaf  -> COLOR0
  235.     dc.l    $de09fffe    ; WAIT 8, 222
  236.     dc.l    $0180086f    ; MOVE $86f  -> COLOR0
  237.     dc.l    $e609fffe    ; WAIT 8,230
  238.     dc.l    $01820fff    ; MOVE $fff -> COLOR1
  239.     dc.l    $e709fffe    ; WAIT 8,231
  240.     dc.l    $01820fdd    ; MOVE $fdd -> COLOR1
  241.     dc.l    $e809fffe    ; WAIT 8,232
  242.     dc.l    $01820fcc    ; MOVE $fbb -> COLOR1
  243.     dc.l    $e909fffe    ; WAIT 8,233
  244.     dc.l    $01820faa    ; MOVE $faa -> COLOR1
  245.     dc.l    $ea09fffe    ; WAIT 8,234
  246.     dc.l    $01820f99    ; MOVE $f99 -> COLOR1
  247.     dc.l    $eb09fffe    ; WAIT 8,235
  248.     dc.l    $01820f77    ; MOVE $f77 -> COLOR1
  249.     dc.l    $ec09fffe    ; WAIT 8,236
  250.     dc.l    $01820f66    ; MOVE $f55 -> COLOR1
  251.     dc.l    $ed09fffe    ; WAIT 8,237
  252.     dc.l    $01820f44    ; MOVE $f33 -> COLOR1
  253.     dc.l    $ee09fffe    ; WAIT 8,238
  254.     dc.l    $01820f33    ; MOVE $f11 -> COLOR1
  255.     dc.l    $ef09fffe    ; WAIT 8,239
  256.     dc.l    $01820f00    ; MOVE $f00 -> COLOR1
  257.     dc.l    $f609fffe    ; WAIT 8, 246
  258.     dc.l    $0180042f    ; MOVE $42f  -> COLOR0
  259.     dc.l    $f809fffe    ; WAIT 8, 248
  260.     dc.l    $01800000    ; MOVE $000  -> COLOR0
  261.  
  262. BobTab:
  263.     dc.b    65,80,105,90    ; T 1
  264.     dc.b    80,90,90,120    ; T 2
  265.  
  266.     dc.b    110,80,120,120  ; H 3
  267.     dc.b    120,95,140,105  ; H 4
  268.     dc.b    140,80,150,120  ; H 5
  269.  
  270.     dc.b    155,85,165,115  ; E 6
  271.     dc.b    160,80,195,90   ; E 7
  272.     dc.b    165,95,185,105  ; E 8
  273.     dc.b    160,110,195,120 ; E 9
  274.  
  275.     dc.b    0,130,35,140    ; P 10
  276.     dc.b    30,135,40,150   ; P 11
  277.     dc.b    10,145,35,155   ; P 12
  278.     dc.b    0,145,10,170    ; P 13
  279.     dc.b    45,160,55,170   ; Punkt 14
  280.  
  281.     dc.b    60,130,95,140   ; R 15
  282.     dc.b    90,135,100,150  ; R 16
  283.     dc.b    60,145,95,155   ; R 17
  284.     dc.b    60,155,70,170   ; R 18
  285.     dc.b    90,155,100,170  ; R 19
  286.     dc.b    105,160,115,170 ; Punkt 20
  287.  
  288.     dc.b    120,135,130,165 ; O 21
  289.     dc.b    125,130,155,140 ; O 22
  290.     dc.b    150,135,160,165 ; O 23
  291.     dc.b    125,160,155,170 ; O 24
  292.     dc.b    165,160,175,170 ; Punkt 25
  293.  
  294.     dc.b    180,135,190,170 ; F 26
  295.     dc.b    185,130,220,140 ; F 27
  296.     dc.b    190,145,210,155 ; F 28
  297.     dc.b    215,160,225,170 ; Punkt 29
  298.  
  299.     dc.b    230,130,240,170 ; I 30
  300.     dc.b    245,160,255,170 ; Punkt 31
  301.  
  302.     dc.b    1
  303.     dc.b    0
  304.  
  305. ScrollText:
  306.     dc.b    "K-Seka Assembler Diskette von The P.R.O.F.I.  "
  307.     dc.b    "many greetings to ICI  "
  308. TextEnde:
  309.  
  310. End:
  311.     dcb.b    512,0
  312.